﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.Linq.SqlClient;

public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

        }
    }
    protected void ldsPages_Selecting(object sender, LinqDataSourceSelectEventArgs e)
    {
        DBAetosDataContext db = new DBAetosDataContext();
        int? roleId = 0;

        if (Session["User" + Session.SessionID] != null)
        {
            UserQ user = (UserQ)Session["User" + Session.SessionID];
            roleId = user.RoleId;
        }

        e.Result = db.GetListPagesByRole(roleId);
    
    }
}
